An interesting question is if the music taste of me and my brother is different enough for a classifier to see the difference. To see this, I used the provided k-nearest neighbors classifier and trained it on a dataset of 300 of my top songs and 300 of my brothers top songs.
The algorithm gave some clear results and in the first graph a clear diagonal line can be seen. For a confusion matrix a solid diagonal line means that the classifier has classified everything correctly, so when you see a diagonal it means it has done a pretty good job.
Looking at the numbers, the classifier had an accuracy of 62.8%, which means it classified a song correctly 62.8% of the time. The baseline for this prediction is 50%, as that is the accuracy you will get if you pick a person at random. So the classifier is better than picking at random, but definitely not perfect. I tried removing features that seemed less important according to the difference in means, but this didn’t seem to increase the accuracy in a significant way.
Using the decision trees method the accuracy increased to 67.0%. The confusion matrix is shown in the second graph. What is interesting to note is that number of correct predictions for my songs increased, but for my brother it slightly decreased. The most important features for the decision tree seems to be energy, acousticness, speechiness and loudness.
Lastly, using the random forests classification method, the accuracy increased to 73.8%. This method definitely seems to be the best for this specific dataset and also provides the best looking confusion matrix as seen in the third graph, with an increase for both playlists.
In this portfolio I will be comparing the music taste of my brother Joran and I (Ilja) over the years. To do this, I will be using Spotify’s “Your Top Songs 20XX” playlist from both my brother and I for 2016 until 2019. Both of us have been using spotify as our main music app for these years, so your top songs playlists should reflect our music taste over the years pretty closely.
The research question I will be trying to answer is how me and my brothers music taste have changed over the years and if our music tastes have grown closer to eachother or further apart over the past few years. This is an interesting question, as we lived together with my parents in 2016 and most of 2017, but in November 2017 I moved to Diemen and in January of 2018 my brother moved away to Rotterdam. I’m curious as to how this may have affected our music tastes, because when we both lived at my parents we were exposed to each others music regularly, but now it is not a regular occurance anymore.
As a first look at the change in your music over the years, I plotted the means of five Spotify features over these past four years. To give a better understanding of the plot, I will tell you about our general taste in music over the years. In 2016, I listened to what I would describe as mostly indierock, (indie)pop and electronic music, with a little bit of metal and hip-hop sprinkled in. For my brother, his taste was mostly metal, alternative rock and also electonic music. After this, my music taste shifted to a lot more hip-hop and less pop, while my brother started listening to more electronic music. In the last two years, I also started listening to more electronic music while also continuing my trend of hip-hop. My brother kept up with the electronic music, but also started listening to some less agressive rock. I think these changes are also reflected in the data. My danceability and energy seem to have generally gone upwards over the last few years, which is probably mostly due to more electronic music and milder hip-hop. For my brother, these have seemed to stay pretty much the same. With morer electronic music, you would expect the instrumentalness to go up like it did for my brother, but I think it didn’t because I listen to slightly different electronic music than my brother. We both listen to a lot of drum&bass, but I listen to drum&bass with more vocals and melody while he listens to some rougher stuff.
In general, I think the plotted lines show we grew apart a bit after we both left the house, but have come closer together in the last year.
This plot is showing the data of all the songs over the years. Something that is immediately clear is that the valence for me (which is the red cloud) has seem to floated to the top of the blue sea a little bit. This could also be seen in the line chart in the last storyboard, but I think this plot shows it more clearly. While my brothers music had a higher valence in the first two years, mine suddenly started rising in 2018, while the valence of my brother lowered a little bit. You could think that I have gotten happier over the years, which I don’t think is the case, but maybe sometimes you need happier music to cheer you up.
For these plots we looked at the chroma and timbre of one song for both of us. These songs were selected from our top 10 songs of 2019 and chosen so that they could show us some interesting differences between different parts of the songs.
The song that I chose from my playlist is Devil In A New Dress by Kanye West and Rick Ross. For the first part of the song it has a repeating beat with Kanye West rapping over it, but about 3 minutes into the song a bridge starts with a guitar solo (which is quite unheard of in hip hop music). This can be seen in both the timbre and chromagram around the 200 mark on the x-axis. After this solo Rick Ross starts his verse, which has a similar timbre and chroma to Kanye’s part. Lastly, the song ends with another guitar parts, which can be clearly seen in the timbre graph, but less clearly in the chroma graph. This is because in the first solo, it is only the guitar, but at the end, the beat is also still playing through the guitar, so the chromagram doesn’t pick it up.
For my brother I chose the song Space Oddity by David Bowie (which to be honest, I wasn’t quite familiar with). The song starts with an instrumental, then has its first verse after which is another instrumental. Then there is a second verse, a chorus, a third verse, again the chorus and lastly another intrumental part. Looking closely at the timbre graph, these different parts of the song can be picked out. There are four instumental parts, which can be seen from the four darker ‘rectangles’ along the diagonal. Between those rectangles are the verses and choruses, of which the choruses have the brightest colours.
For these graphs I compared the keys of my top songs, my brother’s top songs and for a fair comparison also the first 400 songs of the Dutch Top 2000 playlists. I chose this playlist as it seems like a good general playlist that represents the music taste in The Netherlands.
Surprisingly, the graphs for my brother and I are quite similar, and nothing really stands out except maybe the lack of gaps between G, A and B for my playlist compared to my brothers playlist. To check that this is not just a standard distribution you can look at the top 2000 playlist and see that this has a way different distribution.
In these graphs I look at the keygrams of the same two songs I looked at the chromagrams of, Devil In A New Dress and Space Oddity.
Devil In A New Dress definitely seems to be in F minor. This is most clearly seen during the verses, and is less clear during the bridge in the middle of the song.
Space Oddity has a less clear key and maybe even seems to switch up for a little bit. The song seems to be in Db major, but during the verses it seems to switch to D minor according to the keygram. I don’t think the keys are actually switched during the song, but I can’t give a definitive answer as to what key the song is in by only looking at this graph.
When comparing the tempos of our top songs, there is a visible difference. The first thing that you will notice while looking at the graphs is that my brother seems to listen to a lot of songs around the 175 BPM mark. This is very different from the distribution of the top 2000 songs, which can maybe be seen as a sort of average for the Dutch taste. However this peak can easily be explained by my brothers taste for Drum&Bass and other high tempo electronic music, as I also explained earlier.
The distribution of tempo in my top songs is actually quite similar to the top 2000 distribution and while I do also listen to some electronic music, it is a smaller part of my top songs. I would also say that the electronic music I listen to has a lower tempo than my brothers electronic music on average.